#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#if 0

int My_strlen(char* arr)
{
	int count = 0;
	char* p = arr;
	while (*p != '\0')
	{
		count++;
		p++;
	}
	return count;
}

int main()
{
	char arr[] = "abcdefgh";
	int ret=My_strlen(arr);
	printf("%d\n", ret);
	return 0;
}



char* My_strcpy(char* str, const char* arr)
{
	char* p = str;
	while (*(str++) = *(arr++))
	{
		;
	}
	return p;
}


int main()
{
	char str[] = "absdefg";
	char arr[10] = { 0 };
	My_strcpy(arr, str);
	printf("%s", arr);
	return 0;
}
#endif

char* My_strcat(char* arr, const char* str)
{
	char* p = arr;
	while (*(arr++))
	{
		;
	}
	arr--;
	while (*(arr++) = *(str++))
	{
		;
	}
	return p;
}

int main()
{
	char arr[20] = "abcd";
	char str[] = "abcdefg";
	char* p1=My_strcat(arr, str);
	printf("%s", p1);
	return 0;
}